﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data.SqlClient;
using CMP.ERP.Model;
using CMP.ERP.DAL;
using System.Data;

namespace CMP.ERP.BLL
{
    /// <summary>
    /// 显示订单信息
    /// </summary>
    public class ShipmentsBLL
    {
        /// <summary>
        /// 实例化ShipmentsDAL对象
        /// </summary>
        ShipmentsDAL dal = new ShipmentsDAL();

        /// <summary>
        /// 显示订单信息
        /// </summary>
        /// <returns></returns>
        public List<Shipments> ShowShipments()
        {
            return dal.ShowShipments();
        }
        /// <summary>
        /// 根据年月日
        /// </summary>
        /// <param name="Year"></param>
        /// <param name="Month"></param>
        /// <param name="Day"></param>
        /// <returns></returns>
        public DataTable SelShipments(string  StartTime, string End_Time, string Shipments_Per, string Shipments_Phone)
        {
            return dal.SelShipments(StartTime, End_Time,Shipments_Per,Shipments_Phone);
        }
        public DataTable SelYear(string StartTime, string End_Time)
        {
            return dal.SelYear(StartTime, End_Time);
        }
        public DataTable SelMonth(string StartTime, string End_Time)
        {
            return dal.SelMonth(StartTime, End_Time);
        }
        public DataTable SelDay(string StartTime, string End_Time)
        {
            return dal.SelDay(StartTime, End_Time);
        }
        /// <summary>
        /// 购买订单信息
        /// </summary>
        /// <param name="model"></param>
        /// <param name="list"></param>
        public List<int> AddShipments(Shipments model, List<ShipmentMate> list)
        {
            return  dal.AddShipments(model, list);
        }

        /// <summary>
        /// 查看购买订单信息  
        /// </summary>
        /// <param name="Shipments_Id"></param>
        /// <returns></returns>
        public DataTable DetailsShow(int id)
        {
            return dal.DetailsShow(id);
        }
        /// <summary>
        /// 根据编号获取
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public DataTable ShowXiangqing1(int id)
        {
            return dal.ShowXiangqing1(id);
        }
        /// <summary>
        /// 审核出库
        /// </summary>
        /// <param name="StockOrderID"></param>
        /// <param name="listPurchaseOrderSheetInfo"></param>
        /// <returns></returns>
        public List<int> Update(int Shipments_Id, List<ShipmentMate> listpor)
        {
            return dal.Update(Shipments_Id, listpor);
        }
        /// <summary>
        /// 根据订单编号获取仓库编号
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public Shipments erpop(int id)
        {
            return dal.erpop(id);
        }
        /// <summary>
        /// 详细信息
        /// </summary>
        /// <param name="PorMaid"></param>
        /// <returns></returns>
        public List<ShipmentMate> huoquiry(int ShipmentMate_Id)
        {
            return dal.huoquiry(ShipmentMate_Id);
        }
        /// <summary>
        /// 未发货的数量
        /// </summary>
        /// <returns></returns>
        public int shu()
        {
            return dal.shu();
        }
        /// <summary>
        /// 未发货的数量
        /// </summary>
        /// <returns></returns>
        public int shu1()
        {
            return dal.shu1();
        }
        /// <summary>
        /// 当天的订单
        /// </summary>
        /// <returns></returns>
        public int ShowOneday()
        {
            return dal.ShowOneday();
        }
        /// <summary>
        /// 三天内
        /// </summary>
        /// <returns></returns>
        public int ShowThreeday()
        {
            return dal.ShowThreeday();
        }
        /// <summary>
        /// 六天内
        /// </summary>
        /// <returns></returns>
        public int ShowSixday()
        {
            return dal.ShowSixday();
        }
        /// <summary>
        /// 七天内
        /// </summary>
        /// <returns></returns>
        public int ShowSevenday()
        {
            return dal.ShowSevenday();
        }
    }
}
